'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	// const baseId = 7711234567890131;
	// const customId = 8811234567890131;
	// const { data } = await db.collection('a-dz-course-list').limit(1000).get();
	// for (let i = 0; i < data.length; i++) {
	// 	await db.collection('a-dz-course-list').doc(data[i]._id).update({
	// 		courseId: baseId + i * 88888888
	// 	})
	// }
	// const { data } = await db.collection('a-dz-course-list-custom').limit(1000).get();
	// for (let i = 0; i < data.length; i++) {
	// 	await db.collection('a-dz-course-list-custom').doc(data[i]._id).update({
	// 		courseId: customId + i * 88888888
	// 	})
	// }
	// const res = await db.collection('a-dz-course-list-custom').limit(1).get();
	// console.log(res.data)
	const { result } = await uniCloud.callFunction({
		name: 'a-dz-pwd-valid',
		data: {
			password: '123456',
			userPassword: '$UNI_ID_HMAC_SHA256$20$920c1475a4c41b49ba27539e73526761e36bd8b5c070c3713bea0dd4e9547ebf8702650fcad66758ff11'
		}
	})
	console.log('res===>', result.isTrue)
}